In [ ]:
In [1]:
In [2]:
head(train)
Out[2]:
In [3]:
head(test)
Out[3]:
In [6]:
library(party)
In [16]:
model_DT <- ctree(deposit ~., data=train, controls=ctree_control(maxdepth=2))
In [17]:
print(model_DT)
In [18]:
plot(model_DT)
In [19]:
plot(model_DT, type="simple")
In [20]:
testPrediction <- predict(model_DT, test, type="response")
Exercise
Compute the error and accuracy metrics:
In [ ]:
Exercise
Now, set maxdepth to 6 and measure accuracy metrics
Set maxdepth to 0 and measure accuracy metrics
In [ ]: